/*

* ------------------------------------------------------------------------
* ------------------------------------------------------------------------
* |     Smart-Shop开源商城系统/ Java商城-首选电商平台系统 请务必保留此注释头信息
* |     开源地址: https://gitee.com/ningbo-qishan/gruul-mall
* ------------------------------------------------------------------------
* ------------------------------------------------------------------------
* |     可正常分享和学习源码,未经授权 不可商用！
* |     商业版中台购买/开源版商业授权 联系技术客服
* |     官网:  https://www.73app.cn/
* ------------------------------------------------------------------------
* ------------------------------------------------------------------------
* |     Copyright (c) 2016-2999 宁波启山智软科技有限公司
* |     版权所有 ,侵权必究！
* ------------------------------------------------------------------------

*/
package com.medusa.gruul.finance.api.entity;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import com.medusa.gruul.common.data.base.BaseEntity;
import com.medusa.gruul.finance.api.enums.AccountTypeEnum;
import com.medusa.gruul.finance.api.enums.BrokerageTypeEnum;
import com.medusa.gruul.finance.api.enums.SettlementStatusEnum;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.EqualsAndHashCode;

import java.math.BigDecimal;

/**
 * <p>
 * 佣金明细
 * </p>
 *
 * @author alan
 * @since 2020 -02-22
 */
@Data
@EqualsAndHashCode(callSuper = true)
@TableName("t_finance_brokerage_detail")
@ApiModel(value = "FinanceBrokerageDetail对象", description = "佣金明细")
public class FinanceBrokerageDetail extends BaseEntity<FinanceBrokerageDetail> {

    private static final long serialVersionUID = 1L;

    /**
     * id
     */
    @ApiModelProperty(value = "id")
    @TableId(value = "id", type = IdType.AUTO)
    private Long id;

    /**
     * 商铺ID
     */
    @ApiModelProperty(value = "商铺ID")
    @TableField("shop_id")
    private String shopId;

    /**
     * 结算状态：0->未确认；1->已确认；2->已撤销
     */
    @ApiModelProperty(value = "结算状态：0->未确认；1->已确认；2->已撤销")
    @TableField("status")
    private SettlementStatusEnum status;

    /**
     * 用户类型：0->团长;1->区域团长;2->提货点
     */
    @ApiModelProperty(value = "用户类型：0->团长;1->区域团长;2->提货点")
    @TableField("account_type")
    private AccountTypeEnum accountType;

    /**
     * 所属用户
     */
    @ApiModelProperty(value = "所属用户")
    @TableField("user_id")
    private String userId;


    /**
     * 佣金
     */
    @ApiModelProperty(value = "佣金")
    @TableField("brokerage")
    private BigDecimal brokerage;


    /**
     * 来源订单id
     */
    @ApiModelProperty(value = "来源订单id")
    @TableField("order_id")
    private Long orderId;

    /**
     * 订单金额
     */
    @ApiModelProperty(value = "订单金额")
    @TableField("order_amount")
    private BigDecimal orderAmount;


    /**
     * 总销售额
     */
    @ApiModelProperty(value = "总销售额")
    @TableField("sales_total")
    private BigDecimal salesTotal;


    /**
     * 月份
     */
    @ApiModelProperty(value = "月份")
    @TableField("month")
    private String month;

    /**
     * 来源团长id
     */
    @ApiModelProperty(value = "来源团长id")
    @TableField("ass_id")
    private Long assId;

    /**
     * 类型：0->普通佣金;1->激励计划
     */
    @ApiModelProperty(value = "类型：0->普通佣金;1->激励计划")
    @TableField("type")
    private BrokerageTypeEnum type;

    /**
     * 订单流水号
     */
    @ApiModelProperty(value = "订单流水号")
    @TableField("sn")
    private String sn;

}
